package com.cqupt.scanning.system.admin.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.cqupt.scanning.system.admin.entity.dto.DepartmentDTO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author 宋宝梁
 * @since 2021-07-06
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class Organization implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 机构名
     */
    private String orgName;

    /**
     * 机构编号
     */
    private String orgNum;

    /**
     * 机构地址
     */
    private String orgAddress;

    /**
     * 机构联系人
     */
    private String orgContactPerson;

    /**
     * 联系人电话
     */
    private String contactPersonPhone;

    @Version
    private Integer version;

    /**
     * 逻辑删除：0(false)未删除，1(true)已删除
     */
    @TableLogic
    private Boolean deleted;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(exist = false)
    private List<DepartmentDTO> departments;

//    @TableField(exist = false)
//    private List<DeviceDTO> deviceDTOList;

}
